# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=perl-net-socks
_cpanname=SOCKS
pkgver=0.03
pkgrel=13
pkgdesc='TCP/IP access through firewalls using SOCKS.'
arch=('any')
url='http://search.cpan.org/~CLINTDW/SOCKS'
license=('GPL' 'custom')
depends=('perl')
options=('!emptydirs')
conflicts=('perl-socks')
provides=('perl-socks')
source=("http://www.cpan.org/authors/id/C/CL/CLINTDW/$_cpanname-$pkgver.tar.gz")
sha512sums=('2c8aa16ec519db17f992e76a3d198b038a74e4978f56ecd41a3723eb2e0717b958ddf829e7e8973f8dcc1d47b88215e8b8ffa787cf293f193d1120f16a5418b5')

build() {
  cd "$_cpanname-$pkgver"

  sed -i '/^auto_install/d' Makefile.PL

  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor

  make
}

package() {
  cd "$_cpanname-$pkgver"

  make install DESTDIR=$pkgdir

  find $pkgdir -name '.packlist' -delete
  find $pkgdir -name '*.pod' -delete
}

